<?php

require_once __DIR__.'/libs/Smarty.class.php';

class kyoSmarty extends Smarty
{
    static private $instance = null;

    public function __construct()
    {
        parent::__construct();

        $this->setTemplateDir("./templates");
        $this->setCompileDir("./temp/compile");
        $this->setCacheDir("./temp/cache");
        $this->setConfigDir("./config");
        $this->setCaching(Smarty::CACHING_LIFETIME_CURRENT);
    }

    static public function getInstance()
    {
        if (is_null(self::$instance))
            self::$instance = new kyoSmarty();

        return self::$instance;
    }
}
